package cn.itcast.wanxinp2p.account;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;


/**
 * 主要工程类
 * @author 60144
 */
@SpringBootApplication(scanBasePackages ={"cn.itcast.wanxinp2p.account","org.dromara.hmily"})
@EnableDiscoveryClient
@EnableApolloConfig
@EnableTransactionManagement
public class AccountApp {

    public static void main(String[] args) {
        SpringApplication.run(AccountApp.class, args);
    }

    /**
     * 注入远程调用
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}